#include "MRMesh.h"

MRLevel::MRLevel(int level, int num_sections)
{
	this->level = level;
	this->num_sections = num_sections;
	sections = (MRSection **) malloc(num_sections*sizeof(MRSection *));
}

MRLevel::MRLevel(int num_splats)
{
	this->num_splats = num_splats;
	splats = (Splat **) malloc(num_splats*sizeof(Splat *));
}

void MRLevel::draw(d_Frustum frustum)
{
	//for(int i=0; i<num_sections; i++)
	//	sections[i]->draw(-1,frustum);

	for(int i=0; i<num_splats; i++)
	{
		glNormal3f(splats[i]->n[0], splats[i]->n[1], splats[i]->n[2]);
		glColor3f(splats[i]->c[0], splats[i]->c[1], splats[i]->c[2]);
		glVertex3f(splats[i]->vp[0], splats[i]->vp[1], splats[i]->vp[2]);
	}
}
